  {% include "header.html" %}
  <script type="text/javascript" >
    var agency_id = "{{ agency_id }}";
    var route_type = "{{ route_type }}";
  </script>
  <h1>Fare  List <a href="http://code.google.com/transit/spec/transit_feed_specification.html#routes_txt___Field_Definitions">Refer</a></h1>
  {% if prompt %}
  <p id="prompt">{{ prompt }}</p>
  {% endif %}
  <div id="editor">
    <form method="POST" action="{{ url }}" id="editorform">
      <table>
        <tr>
          <th>Items</th>
          <th>Values</th>
        </tr>
        <tr>
          <td>ID</td>
          <td><input name = "fare_id" id = "fare_id" type="TEXT" value="{{ fare.id }}"/></td>
        </tr>
        <tr>
          <td>Price</td>
          <td><input name = "price" id = "price" type="text" value="{{fare.price}}"/>      
          </td>
        </tr>
        <tr>
          <td>Currency Type</td>
          <td>
          <input type="text" name="currency_type" id = "currency_type" value="{{fare.currency_type}}"/>
          <!--
          <select name = "currency_type" id = "currency_type">
          
          </select>
          -->
          </td>
        </tr>
        <tr>
          <td>Payment Method</td>
          <td>
          <select name = "payment_method">
          {% if fare.payment_method %}
          <option value="0">Paid on board</option>
          <option value="1" selected>Paid before boarding</option>
          {% else %}
          <option value="0" selected>Paid on board</option>
          <option value="1">Paid before boarding</option>
          {% endif %}          
              </select>
          </td>
        </tr>
        <tr>
          <td>Transfers</td>
          <td>          <select name = "transfers">
          {% if fare.transfers == 0 %}
          <option value="0" selected>No Transfers</option>
          {% else %}
          <option value="0">No Transfers</option>
          {% endif %}
          {% if fare.transfers == 1 %}
          <option value="1" selected>Once</option>
          {% else %}
          <option value="1">Once</option>
          {% endif %}
          {% if fare.transfers == 2 %}
          <option value="2" selected>Twice</option>
          {% else %}
          <option value="2">Twice</option>
          {% endif %}
          {% if fare.transfers == "" %}
          <option value="" selected>Unlimited</option>
          {% else %}
          <option value="">Unlimited</option>
          {% endif %}     
              </select>
          </td>
        </tr>
        <tr>
          <td>Transfer Duration</td>
          <td><input name = "transfer_duration" type="text" value="{{ fare.transfer_duration }}"/></td>
        </tr>
        <tr>
          <td colspan="2">
            <input type="submit" id = "submit" value="{{ submit }}" name = "submit" />
          </td>
        </tr>
      </table>
  </form>


</div>
<div class="sort">
  <form method="POST" action="" name="search">
    <input type="text" value=""/> <input type="submit" value="Search"/>
  </form>


</div>
    <div class="pager">
      paging info: [<a href="#">1</a>] [<a href="#">2</a>] ... [<a href="#">last</a>] <input type="text" value="" size="4" maxlength="4"/> <input type="submit" value="Go" />
    </div>
    <table>
      <tr>
    <th>&nbsp;</th>
    <th>Fare ID</th>
    <th>Price</th>
    <th>Currency Type</th>
    <th>Payment Method</th>
    <th>Transfers</th>
    <th>Transfer Duration</th>
    <th>Action</th>
      </tr>
      {% for fare in fares %}
      <tr>
        <td><input type="checkbox" name="deleteid" value="{{fare.id}}"/></td>
        <td>{{fare.id}}</td>
        <td>{{fare.price}}</td>
        <td>{{fare.currency_type}}</td>
        <td>{{fare.payment_method}}</td>
        <td>{{fare.transfers}}</td>
        <td>{{fare.transfer_duration}}</td>
        <td>
          <a href="/admin/fare?act=edit&id={{fare.id}}">Edit</a>&nbsp;
          <a href="/admin/fare?act=delete&id={{fare.id}}&route_id=">Delete</a>
        </td>
      </tr>
      {% endfor %}
    </table>
    <div class="pager">
      [<a href="#">1</a>] [<a href="#">2</a>] ... [<a href="#">last</a>] <input type="text" value="" size="4" maxlength="4"/> <input type="submit" value="Go" />
    </div>
    <div class="control">
      <input type="submit" value="Delete All"/>
    </div>
  </body>
</html>
